#ifndef CUSTOMTABVIEW_H
#define CUSTOMTABVIEW_H

#include <QFrame>
#include <QStackedWidget>
#include <QHBoxLayout>
#include <QPushButton>
#include <QVector>
#include <QPropertyAnimation>
#include "funcforms/FuncDefine.h"

// 多标签页浏览窗口
class CustomTabView : public QFrame
{
    Q_OBJECT
public:
    CustomTabView(QWidget* parent = nullptr);
    ~CustomTabView() {}
    void addTabType(const FUNC_FORM_TYPE nType);
    void showTabIndex();
private:
    void newTab();

private slots:
    void slt_newTabIdx();
    void slt_delTabIdx();
    void slt_selectTabIdx(uint nIndex);
private:
    void reset();

private:
    bool m_bShowTabIndex;
    FUNC_FORM_TYPE m_nType;

    QFrame* m_pTabIndex;
    QVector<FluButton*> m_vecTabIndex;
    QHBoxLayout* m_pTabIdx;
    QStackedWidget* m_pTabViews;
};

#endif // CUSTOMTABVIEW_H
